package com.example.hhh.model.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName workorder
 */
@TableName(value ="workorder")
@Data
public class Workorder {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer orderId;

    /**
     * 
     */
    private String orderNumber;

    /**
     * 
     */
    private Integer customerId;

    /**
     * 
     */
    private Integer businessId;

    /**
     * 处理人员
     */
    private Integer assignedTo;

    /**
     * 0-新建,1-处理中,2-已完成,3-已退回
     */
    private Integer orderStatus;

    /**
     * 1-高,2-中,3-低
     */
    private Integer priority;

    /**
     * 
     */
    private String description;

    /**
     * 
     */
    private Date expectedCompleteTime;

    /**
     * 
     */
    private Date actualCompleteTime;

    /**
     * 
     */
    private Date createTime;

    /**
     * 
     */
    private Date updateTime;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Workorder other = (Workorder) that;
        return (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
            && (this.getOrderNumber() == null ? other.getOrderNumber() == null : this.getOrderNumber().equals(other.getOrderNumber()))
            && (this.getCustomerId() == null ? other.getCustomerId() == null : this.getCustomerId().equals(other.getCustomerId()))
            && (this.getBusinessId() == null ? other.getBusinessId() == null : this.getBusinessId().equals(other.getBusinessId()))
            && (this.getAssignedTo() == null ? other.getAssignedTo() == null : this.getAssignedTo().equals(other.getAssignedTo()))
            && (this.getOrderStatus() == null ? other.getOrderStatus() == null : this.getOrderStatus().equals(other.getOrderStatus()))
            && (this.getPriority() == null ? other.getPriority() == null : this.getPriority().equals(other.getPriority()))
            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
            && (this.getExpectedCompleteTime() == null ? other.getExpectedCompleteTime() == null : this.getExpectedCompleteTime().equals(other.getExpectedCompleteTime()))
            && (this.getActualCompleteTime() == null ? other.getActualCompleteTime() == null : this.getActualCompleteTime().equals(other.getActualCompleteTime()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
        result = prime * result + ((getOrderNumber() == null) ? 0 : getOrderNumber().hashCode());
        result = prime * result + ((getCustomerId() == null) ? 0 : getCustomerId().hashCode());
        result = prime * result + ((getBusinessId() == null) ? 0 : getBusinessId().hashCode());
        result = prime * result + ((getAssignedTo() == null) ? 0 : getAssignedTo().hashCode());
        result = prime * result + ((getOrderStatus() == null) ? 0 : getOrderStatus().hashCode());
        result = prime * result + ((getPriority() == null) ? 0 : getPriority().hashCode());
        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
        result = prime * result + ((getExpectedCompleteTime() == null) ? 0 : getExpectedCompleteTime().hashCode());
        result = prime * result + ((getActualCompleteTime() == null) ? 0 : getActualCompleteTime().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", orderId=").append(orderId);
        sb.append(", orderNumber=").append(orderNumber);
        sb.append(", customerId=").append(customerId);
        sb.append(", businessId=").append(businessId);
        sb.append(", assignedTo=").append(assignedTo);
        sb.append(", orderStatus=").append(orderStatus);
        sb.append(", priority=").append(priority);
        sb.append(", description=").append(description);
        sb.append(", expectedCompleteTime=").append(expectedCompleteTime);
        sb.append(", actualCompleteTime=").append(actualCompleteTime);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append("]");
        return sb.toString();
    }
}